package com.yf.construction.risk.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yf.construction.risk.dto.ConstructionRiskDTO;
import com.yf.construction.risk.entity.ConstructionRisk;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface RiskConvert {

    RiskConvert INSTANCE = Mappers.getMapper(RiskConvert.class);

    ConstructionRisk dtoToEntity(ConstructionRiskDTO reqDTO);

    ConstructionRiskDTO entityToDto(ConstructionRisk entity);

    List<ConstructionRiskDTO> listEntityDto(List<ConstructionRisk> list);

    Page<ConstructionRiskDTO> pageEntityDto(Page<ConstructionRisk> page);
}
